/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package actions;

import daos.Dao;
import daos.DaoFactory;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author Cristian Ketibian
 * @version 1.0
 */
public class MostrarLoginAction extends Action{
    @Override
    public void execute(HttpServletRequest request, HttpServletResponse response) {
        try {            
            Dao dao = DaoFactory.getDao("ObraSocial");            
            ArrayList listaOS = (ArrayList) dao.select(null); 
            request.setAttribute("lista_os", listaOS);                  
            } catch (Exception ex) {            
                request.setAttribute("Error", ex.getMessage());
            }
            finally{
                this.gotoPage("/login.jsp", request, response);    
            }        
    }   
}
